package com.sphd.emanu.fragment.details.adetailitem;

import android.content.Context;

import com.sphd.emanu.mvp.BasePresenterImpl;
import com.sphd.emanu.pojo.bank.DetailsInfo;

import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;

/**
 * MVPPlugin
 *  邮箱 784787081@qq.com
 */

public class ADetailItemPresenter extends BasePresenterImpl<ADetailItemContract.View> implements ADetailItemContract.Presenter{

    @Override
    public void getDetail(int detatilId) {
        emanuService.getDetail(detatilId).enqueue(new Callback<DetailsInfo>() {
            @Override
            public void onResponse(Call<DetailsInfo> call, Response<DetailsInfo> response) {
                mView.setBean(response.body());
            }

            @Override
            public void onFailure(Call<DetailsInfo> call, Throwable t) {
                Error(t);
            }
        });
    }
}
